package cn.net.msg.service;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import cn.net.msg.dao.TbScoreDao;
import cn.net.msg.model.ReturnRankBean;
import cn.net.msg.model.TbScore;

@Component("tbScoreService")
public class TbScoreService {

    @Resource(name="tbScoreDao")
    private TbScoreDao dao;

    @Transactional
    public boolean isExsit(TbScore tbScore){
        return dao.isExsit(tbScore);
    }

    @Transactional
    public void save(TbScore tbScore){
        dao.save(tbScore);
    }

    @Transactional
    public void updateScoreRank(TbScore tbScore) {
        dao.updateScoreRank(tbScore);
    }

    public ReturnRankBean getScoreRank(long userid, String examFileIdsString){
        return dao.getScoreRank(userid, examFileIdsString);
    }
}
